x86: eliminate bogus IRQ restrictions
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 13 Aug 2010 13:59:03 +0000 (14:59 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 13 Aug 2010 13:59:03 +0000 (14:59 +0100)
commit44404bde3971c4f1d575ed3cd7702d2a74cb33b7
treee9b45f23be2cff8df7b0fc31e4eb55e570473466
parent88616ac08c303ae20a55fcd8f6e2882af9e43175
x86: eliminate bogus IRQ restrictions

As pointed out in
http://lists.xensource.com/archives/html/xen-devel/2010-07/msg00077.html
the limits introduced in c/s 20072 are at least
questionable. Eliminate them in favor of a more dynamic approach:
There's no real need for an upper limit on nr_irqs (as anything beyond
nr_irqs_gsi isn't visible to domains anyway), and the split point (and
hence ratio) between GSI and MSI/MSI-X IRQs doesn't need to be hard
coded, but can instead be controlled on the command line in case there
are *very* many GSIs.

The default used for nr_irqs will be rather large with this patch, so
it may not be acceptable without also switching to a sparse irq_desc[]
as was done not so lomg ago in Linux.

The added capping of any domain's nr_pirqs is based on the observation
that no domain can possibly have more than the system wide number of
IRQs. The opposite case may in fact also require some adjustment:
Defaulting the number of non-GSI IRQs available (namely to Dom0) to a
fixed value may not be the best choice going forward, since if there
indeed are very many non-GSI interrupt sources, it won't be possible
for the kernel to make use of them without giving
"extra_guest_irqs=" on the command line (but the goal should be to
allow things to work right by default even on large systems).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/io_apic.c
xen/arch/x86/irq.c
xen/common/domain.c
xen/include/asm-x86/irq.h